app.controller('modifyPasswordCtrl', function($scope,$http,rest,$compile,$location,ngDialog,user,$state,$window,uiLoad,$rootScope,$ocLazyLoad) {
	

	$scope.params = {
		uid: $window.localStorage.getItem("id"),
		loginName: $window.localStorage.getItem("loginName"),
		userName: $window.localStorage.getItem("userName"),
		
	}
	var oldLoginPwd = ($window.localStorage.getItem("oldLoginPwd"));
	
	$scope.FormSubmit = function(){
		if ($scope.params.updateLoginPwd != $scope.params.updateReloginPwd) {
			alert("两次密码输入不一致!");
			flag = false;
		}else{
			flag = true;
		}
		if (flag) {
			rest.deco({
		        url: '/settlement-center-service/admin/user/updatePassword.do',
		        data: $scope.params,
		        success: function(data){
		        	var data = JSON.parse(data);
		        	if (data.statusCode == "200") {
		        		alert(data.message);
		        	}else{
						alert(data.message);
		        	}
		        }
		    })
		}
	}
	
})